
- if latest_release = @release.outdated?
  .callout.callout-warning
    h5
      i.icon.fas.fa-info
      |  当前不是最新版本！
    p
      = " #{latest_release.release_version} (#{latest_release.build_version}) "
      = "于 #{time_ago_in_words(latest_release.created_at)}发布了，"
      = link_to '点击查看最新版本', channel_release_path(latest_release.channel, latest_release)
      | 。

.app-detail.card
  .card-header
    h3.card-title
      = app_icon(@release, size: :medium, class: 'app-icon img-circle img-bordered-sm')
      .app-name
        = @release.app_name
        .app-identifier
          = @release.bundle_id
  .card-body
    ul.app-metadata
      li title="上传版本"
        i.fab.fa-gg
        = @release.version
      li title="平台"
        = device_icon(@release.channel.device_type)
        = display_app_device(@release)
      - if @release.name.present?
        li title="应用名"
          i.fas.fa-file
          = @release.name
      li title="主版本"
        i.fas.fa-server
        = "#{@release.release_version} (#{@release.build_version})"
      - if @release.release_type.present?
        li title="类型"
          i.fas.fa-cubes
          = release_type_url(@release)
      - if @release.file.present?
        li title="文件体积"
          i.fas.fa-weight
          = " #{number_to_human_size(@release.file.size)}"
      li title="上传时间"
        i.fas.fa-calendar
        = time_ago_in_words(@release.created_at)
      - if @release.branch.present?
        li title="Git 分支"
          i.fas.fa-code-branch
          = git_branch_url(@release)
      - if @release.git_commit.present?
        li title="Git Commit"
          i.fab.fa-git-alt
          = git_commit_url(@release.channel.git_url, @release.git_commit)
      - @release.custom_fields.each do |field|
        li title="#{field['name']}"
          i.fas class="fa-#{field['icon'] || 'hashtag'}"
          = field['value']
      li title="上传来源"
        i.fas.fa-compass
        - if @release.ci_url.blank?
          = @release.source
        - else
          = link_to @release.source, @release.ci_url

    .app-actions
      - unless wechat?
        - if @release.has_file?
          == render 'releases/body/install_cert'

          - if detect_device(@release.channel.device_type) == :ios
            / iOS 和 Mac 显示此按钮
            button.btn.btn-icon.btn-lg.bg-success[
                id="download_it"
                data-install-url="#{@release.install_url}"
                data-loading-text="<i class='fas fa-spin fa-sync'></i> 等待安装 ..."]
              i.fas.fa-paper-plane
              | 安装

          a.btn.btn-icon.btn-lg.bg-success href="#{@release.download_url}" target="_blank"
            i.fas.fa-download
            - if android?(user_agent)
              | 安装
            - else
              | 下载
        - else
          button.btn.btn-secondary.btn-icon.disabled
            i.fas.fa-ghost
            | 遗失文件不可安装或下载

        / span style=("margin:0 5px")
        / - if @release.ci_url.present?
        /   button#build_it.btn.btn-icon.bg-success.btn-social data-app-id="#{@release.app.id}" data-job="#{@release.ci_url}" data-loading-text=("<i class='fa fa-circle-o-notch fa-spin'></i> 正在构建...") data-toggle="modal" onclick="build()" style=("margin-left: 10px")
        /     i.fas.fa-wrench
        /     | 构建新版

        div.ios-install-issues.d-none
          i.fas.fa-asterisk
          a href="javascript:void();" 无法安装或遇到 "未受信任的企业级开发者" 错误？

    p#jekins_buld_alert.alert.alert-warning.d-none role="alert" style=("margin-top: 10px")